home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / MPW C++ / MPW C++ 3.1 / Examples / CPlusExamples / CPlusTESample.make < prev    next >
Text File  |  1990-09-11  |  4KB  |  122 lines

  1. #------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Simple TextEdit Sample Application
  6. #
  7. #    CPlusTESample
  8. #
  9. #    This file: CPlusTESample.make    -    Make source
  10. #
  11. #    Copyright © 1989 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #
  15. #   This version of TESample has been substantially
  16. #   reworked in C++ to show how a "typical" object oriented
  17. #   program could be written. To this end, what was once a
  18. #   single source code file has been restructured into a
  19. #   set of classes which demonstrate the advantages of
  20. #   object-oriented programming. 
  21. #   
  22. #   There are four main classes in this program. Each of
  23. #   these classes has a definition (.h) file and an
  24. #   implementation (.cp) file.  
  25. #   
  26. #   The TApplication class does all of the basic event
  27. #   handling and initialization necessary for Mac Toolbox
  28. #   applications. It maintains a list of TDocument objects,
  29. #   and passes events to the correct TDocument class when
  30. #   apropriate. 
  31. #   
  32. #   The TDocument class does all of the basic document
  33. #   handling work. TDocuments are objects that are
  34. #   associated with a window. Methods are provided to deal
  35. #   with update, activate, mouse-click, key down, and other
  36. #   events. Some additional classes which implement a
  37. #   linked list of TDocument objects are provided. 
  38. #   
  39. #   The TApplication and TDocument classes together define
  40. #   a basic framework for Mac applications, without having
  41. #   any specific knowledge about the type of data being
  42. #   displayed by the application's documents. They are a
  43. #   (very) crude implementation of the MacApp application
  44. #   model, without the sophisticated view heirarchies or
  45. #   any real error handling. 
  46. #   
  47. #   The TESample class is a subclass of TApplication. It
  48. #   overrides several TApplication methods, including those
  49. #   for handling menu commands and cursor adjustment, and
  50. #   it does some necessary initialization. Note that we
  51. #   only need to override 
  52. #   
  53. #   The TEDocument class is a subclass of TDocument. This
  54. #   class contains most of the special purpose code for
  55. #   text editing. In addition to overriding most of the
  56. #   TDocument methods, it defines a number of additional
  57. #   methods which are used by the TESample class to get
  58. #   information on the document state.  
  59. #
  60. #------------------------------------------------------------------------------
  61.  
  62. AppLibObjs =    ∂
  63.     TApplication.cp.o ∂
  64.     TDocument.cp.o
  65.  
  66. AppLibSrcs =    ∂
  67.     TApplication.cp ∂
  68.     TDocument.cp
  69.  
  70. AppLibHdrs =    ∂
  71.     TApplicationCommon.h ∂
  72.     TApplication.h ∂
  73.     TDocument.h
  74.  
  75. Objs =    ∂
  76.     TEDocument.cp.o ∂
  77.     TESample.cp.o ∂
  78.     TESampleGlue.a.o
  79.  
  80. Srcs =    ∂
  81.     TEDocument.cp ∂
  82.     TESample.cp ∂
  83.     TESampleGlue.a
  84.  
  85. Hdrs =    ∂
  86.     TECommon.h ∂
  87.     TEDocument.h ∂
  88.     TESample.h
  89.  
  90. # turn on SADE symbols
  91. SymOpts = -sym off
  92.  
  93. # C++ options
  94. CPlusOptions = {SymOpts}
  95.  
  96. CPlusTESample ƒƒ {Objs} CPlusAppLib.o CPlusTESample.make
  97.     Link -d -o {Targ} {SymOpts} ∂
  98.         {Objs} ∂
  99.         CPlusAppLib.o ∂
  100.         "{CLibraries}"CPlusLib.o ∂
  101.         "{CLibraries}"CRuntime.o ∂
  102.         "{CLibraries}"StdCLib.o ∂
  103.         "{CLibraries}"CInterface.o ∂
  104.         "{Libraries}"Interface.o
  105.     SetFile {Targ} -t APPL -c 'MOOT' -a B
  106.  
  107. CPlusTESample ƒƒ TESample.r TECommon.h CPlusTESample.make
  108.     Rez -append -o {Targ} TESample.r
  109.  
  110. CPlusTESample ƒƒ TApplication.r TApplicationCommon.h CPlusTESample.make
  111.     Rez -append -o {Targ} TApplication.r
  112.  
  113. # if ANY headers change, recompile everything
  114. {Objs} ƒƒ {Hdrs} {AppLibHdrs}
  115.  
  116. CPlusAppLib.o ƒƒ {AppLibObjs} CPlusTESample.make  
  117.     Lib -o {Targ} {SymOpts} {AppLibObjs}
  118.  
  119. # if AppLib headers change, recompile AppLib Objects
  120. {AppLibObjs} ƒƒ {AppLibHdrs}
  121.  
  122.